//: innerclasses/controller/Event.java
// The common methods for any control event.
package tijava.innerclasses.controller;

public abstract class Event {
	private long eventTime;
	protected final long delayTime;

	public Event(long delayTime) {
		this.delayTime = delayTime;
	}

	public void start() { // Allows restarting
		eventTime = System.currentTimeMillis() + delayTime;
	}

	public boolean ready() {
		return System.currentTimeMillis() >= eventTime;
	}

	public void action(){
		System.out.println(this);
	}
} // /:~
